<template>
    <div>
        <el-form :model="formData" label-width="auto">
            <el-form-item label="后端生产地址">
                <el-input v-model="formData.后端生产地址"></el-input>

            </el-form-item>
            <el-form-item label="后端端口">
                <el-input v-model="formData.后端端口"></el-input>
            </el-form-item>


            <el-form-item label="前端生产地址">
                <el-input v-model="formData.前端生产地址"></el-input>
            </el-form-item>
            <el-form-item label="前端端口">
                <el-input v-model="formData.前端端口"></el-input>
            </el-form-item>


        </el-form>

    </div>
</template>
<script setup>
import axios from 'axios'
import { ref, defineExpose } from 'vue'
import { alertsuccess } from '../../utils/alertUtils';
import { Axios } from 'axios';
const formData = ref({
    后端生产地址: '',
})

async function initByDialog(_data){
formData.value.tableName=_data?.tableName;
formData.value.datasourceDto=_data?.datasourceDto;
}
async function submitByDialog() {

    var resuilt=await axios.post('/api/apis', {
        _name: '生产代码',
        模块: '生产代码',
...formData.value
    })
if(resuilt&&resuilt.success){
 alertsuccess('操作成功')
}
}

defineExpose({ initByDialog,submitByDialog })
</script>
